package cn.wolfcode.trip.base.domain;

import com.alibaba.druid.support.json.JSONUtils;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.HashMap;

//商品表
@Setter
@Getter
public class Product extends BaseDomain{

    //商品类别
    private Long type;
    //商品名称
    private String productName;
    //商品价格
    private BigDecimal productPrice;
    //商品图片
    private String productImg;

    public static final Integer TYPE_WEAR=1;
    public static final Integer TYPE_PLAY=2;
    public static final Integer TYPE_ELE=3;
    public static final Integer TYPE_EAT=4;

    //推荐的模态框使用
    public String getJson(){
        HashMap<String, Object> map = new HashMap<>();
        map.put("id",id);
        map.put("productPrice",productPrice);
        map.put("productName",productName);
        map.put("productImg",productImg);
        map.put("type",type);
        return JSONUtils.toJSONString(map);
    }
}